<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全科信息系统极简版</title>
    <link rel="shortcut icon" href="/xh_logo.ico">
    <link href="${ctx }/res/hplus/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="${ctx }/res/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="${ctx }/res/hplus/css/animate.min.css" rel="stylesheet">
    <link href="${ctx }/res/hplus/css/style.min.css?v=4.0.0" rel="stylesheet">
    <base target="_self">
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
    </script>

    <style>

        body {
            /*display: flex;*/
            /*align-items: center;*/
            padding-top: 3%;
        }

        #logo {
            padding-left: 50px;
            background: url("../../../img/logo.jpg") 0 0 no-repeat;
            background-size: 48px;
            color: #1d89db;
            margin-left: 120px;
        }

        #logo h1 {
            margin-bottom: 0;
        }

        #logo h4 {
            margin-top: 0;
        }

        #cont {
            background: url("../../../img/bg372.png") 0 0 no-repeat;
            background-size: 100%;
            padding: 50px 0;
            width: 100%;
            min-width: 1250px;
        }

        #login_box {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            width: 950px;
            margin: 0 auto;

        }

        #login_box h1 {
            font-size: 40px;
        }

        #login_box > div b, #login_box > div > h2 {
            color: #ffffff;
            letter-spacing: 1px;
        }

        #login_box form {
            width: 35%;
            background-color: #ffffff;
        }

        form > div {
            border-top: 2px solid #1d89db;
            padding: 40px 20px;
            box-shadow: 0 4px 60px -1px rgba(171, 171, 171, 0.46);
        }

        #login_box h2 {
            margin-top: 0;
        }

        #login_box form button {
            background-color: #1d89db;
            color: #ffffff;
        }

        #login_box .form-group {
            position: relative;

        }

        #login_box .form-group i {
            position: absolute;
            left: 0;
            top: 0;
            height: 34px;
            line-height: 34px;
            background-color: #46abf3;
            font-size: 20px;
            color: #ffffff;
            width: 35px;
            text-align: center;
        }

        #login_box .form-group input {
            padding-left: 40px;
        }

        #login_box .form-group label {
            font-weight: normal;
        }

        .forget {
            position: absolute;
            top: 0;
            right: 0;
        }
    </style>
</head>

<body>

<div id="logo">
    <h1><b>广东省家庭医生协会</b></h1>
    <h4>GUANGDONG FAMILY DOCTOR ASSOCIATION</h4>
</div>

<div id="cont">
    <div id="login_box" class="animated fadeInDown">
        <div>
            <h2><b>欢迎使用复旦大学附属上海市第五人民医院</b></h2>
            <h2>临床诊断辅助及能力培训系统</h2>
        </div>

        <form role="form" id="form" action="${ctx }/admin/doLogin" method="post">

            <div  style="padding-bottom: 25px">
                <h2>登录</h2>
                <div class="form-group">
                    <i class="fa fa-user"></i>
                    <input type="text" name="j_username" class="form-control" placeholder="用户名" required value="">
                </div>
                <div class="form-group">
                    <i class="fa fa-key"></i>
                    <input type="password" name="j_password" class="form-control" placeholder="密码" value=""
                           required>
                </div>
                <div class="form-group">
                    <label>
                        <input type="checkbox" name="remember-me" value="true">
                        下次自动登录
                    </label>
                    <a href="${ctx}/admin/forgetPwd" class="forget">忘记密码</a>
                </div>
                <div class="form-group" style="color: red;">
                    <c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION }">
                        <c:if test="${'Bad credentials' == SPRING_SECURITY_LAST_EXCEPTION.message }">
                            用户名或密码不正确
                        </c:if>
                        <c:if test="${'Bad credentials' != SPRING_SECURITY_LAST_EXCEPTION.message }">
                            <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'batchrunning' }">
                                <script>
                                    layer.open({
                                        type: 1,
                                        content: $('#batchrunning')
                                    });
                                </script>
                            </c:if>
                            <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message != 'batchrunning' }">
                                <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>
                            </c:if>
                        </c:if>
                    </c:if>
                </div>
                <button type="submit" class="btn block full-width m-b-xs" style="margin-top: 25px">登 录</button>
            </div>
        </form>
    </div>
</div>
    <div style="text-align:center;">
        <h4>本系统由BMJ出版集团、中华医学会、广东省家庭医生协会联合出品</h4>
    </div>

<script src="${ctx }/res/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="${ctx }/res/hplus/js/bootstrap.min.js?v=3.3.5"></script>
<script>
    $(function () {
        $("input[name='j_username']").focus();
    })
</script>
</body>

</html>

            <%--<form class="m-t" role="form" id="form" action="${ctx }/admin/doLogin" method="post">--%>
                <%--<div class="form-group">--%>
                    <%--<input type="text" name="j_username" class="form-control" placeholder="用户名" required="">--%>
                <%--</div>--%>
                <%--<div class="form-group">--%>
                    <%--<input type="password" name="j_password" class="form-control" value="333333" placeholder="密码" required="">--%>
                <%--</div>--%>
                <%--<button type="submit" class="btn btn-primary block full-width m-b">登 录</button>--%>

            <%--</form>--%>